/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import Taro, { Component } from '@tarojs/taro'

// project
import { CPage, CContent, CHeader, CFooter, CFloat, CAround, CBetween, CCenter, CRow, CWrap, CLine, CHand, CItemX, CItemY, CText, CLabel, CSvg, CImage, CButton, CColumn } from '../../../library/comp';
import { Base64, Gen, Time, Zip, Session, Storage, Toast} from '../../../library/func';
import Http from '../../../project/func/http/http'
import "../../../library/style/patch.css"

// 引用组件
/******************************************************************************************
 * Export Class
 ******************************************************************************************/

class IButtomp extends Component {

	constructor(props) {
        super(props);
        this.state = {

        };

    }

    /*------------------------------------------------------------------------------------
	 * 自定义方法
	 *-----------------------------------------------------------------------------------*/

	/**
	 * 渲染
	 */
	render() {

		const touchClass = {active:'0.7'};
		const xyCenter = {x:'center',y:'center'};
		const rightLine = {h:'20',w:'1',bg:'#d7d7d7'};
		const text = {color:'#333333'};

		const enrollment = this.props.enrollment?true:false;
		
        const iscollect = this.props.iscollect?true:false;

        // 渲染
		return (

                <CFooter>
            
                    <CAround bg="#FAFAFA"  h="45" bt="#eee solid 1">
                        {/* <CHand class="f1" px='10' x='around' y='center'>

                            {iscollect?
                            <CItemX x='center'  y='center'>
                                <CSvg  w='15' h='15'></CSvg>
                                <CText size="16" ml="10">已收藏</CText>
                            </CItemX>
                            :
                            <CItemX x='center'  y='center'>
                                <CSvg  w='15' h='15'></CSvg>
                                <CText size="16" ml="10">收藏</CText>
                            </CItemX>
                            }


                        <CHand h='20'   w='1'  bg='#d7d7d7'></CHand>
                            <CItemX x='center'  y='center'>
                                <CSvg  w='15' h='15'></CSvg>
                                <CText size="16" ml="10">评论</CText>
                            </CItemX>
                        </CHand> */}
                        {
                            enrollment ? 
                            <CHand class="f1" bg='#666' x="center" onClick={ this.props.onCencelApply }>
                                <CText align="center" y="center" color='#fff' h='45' lh='45' size='18'>取消报名</CText>
                            </CHand>
                            :
                            <CHand class="f1" bg='#cbb383' x="center" onClick={ this.props.onApply }>
                                <CText align="center" y="center" color='#fff' h='45' lh='45' size='18'>立即报名</CText>
                            </CHand>

                        }

                    </CAround>
                        
                

                </CFooter>




		);
	}

};